package no.ffi.tpm.crypto;



/**
 *
 * @author anders
 */
public class CryptoOperationsFactory {
    public static final String TPM="TPM";
    public static final String JCE="JCE";
    
    public static CryptoOperations getInstance(String param) {
        if (param.equalsIgnoreCase(JCE)) return new JCECryptoOperations();
        else if (param.equalsIgnoreCase(TPM)) return new TPMCryptoOperations();
        else return null;
    }
    
    public static CryptoOperations getInstance(String param,String appPrefix) {
        if (param.equalsIgnoreCase(JCE)) return new JCECryptoOperations(appPrefix);
        else if (param.equalsIgnoreCase(TPM)) return new TPMCryptoOperations(appPrefix);
        else return null;
    }
}
